﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Diagnostics;
using System.Threading;

namespace Bohdan.Arch.Messaging
{
    public abstract class GeneralThreadlessSubscriber : GeneralSingleThreadedSubscriber
    {
        private void BaseProcessMessageCaller(object param)
        {
            base.ProcessMessageCaller((GeneralMessage)param);
        }

        protected override void ProcessMessageCaller(GeneralMessage msg)
        {
            Thread th = new Thread(new ParameterizedThreadStart(BaseProcessMessageCaller));
            th.Priority = this.WorkerThreadPriority;
            th.Start(msg);
        }
    }
}
